package com.csair.youth.database.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the resource table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="resource"
 */

public abstract class BaseResource  implements Serializable {

	public static String REF = "Resource";
	public static String PROP_UPLOAD_USER_ID = "UploadUserId";
	public static String PROP_DESCRIPTION = "Description";
	public static String PROP_UPLOAD_TIME = "UploadTime";
	public static String PROP_UPLOAD_IP = "UploadIp";
	public static String PROP_AUDIT_RESULT = "AuditResult";
	public static String PROP_HTTP_DOWN_ADDRESS = "HttpDownAddress";
	public static String PROP_AUDIT_USER_ID = "AuditUserId";
	public static String PROP_AUDIT_TIME = "AuditTime";
	public static String PROP_CATEGORY_ID = "CategoryId";
	public static String PROP_ABSOLUTE_PATH = "AbsolutePath";
	public static String PROP_LAST_MODIFY_TIME = "LastModifyTime";
	public static String PROP_FILE_NAME = "FileName";
	public static String PROP_DOWNLOAD_TIMES = "DownloadTimes";
	public static String PROP_ID = "Id";
	public static String PROP_FTP_DOWN_ADDRESS = "FtpDownAddress";
	public static String PROP_CONTENT_TYPE = "ContentType";
	public static String PROP_AUDIT_IP = "AuditIp";
	public static String PROP_AUDIT_REMARK = "AuditRemark";


	// constructors
	public BaseResource () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseResource (java.lang.String id) {
		this.setId(id);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseResource (
		java.lang.String id,
		java.lang.String fileName,
		java.lang.String absolutePath,
		java.lang.String uploadUserId,
		java.lang.String uploadIp,
		java.util.Date uploadTime,
		java.lang.Integer downloadTimes,
		java.util.Date lastModifyTime,
		java.lang.String httpDownAddress,
		java.lang.String ftpDownAddress) {

		this.setId(id);
		this.setFileName(fileName);
		this.setAbsolutePath(absolutePath);
		this.setUploadUserId(uploadUserId);
		this.setUploadIp(uploadIp);
		this.setUploadTime(uploadTime);
		this.setDownloadTimes(downloadTimes);
		this.setLastModifyTime(lastModifyTime);
		this.setHttpDownAddress(httpDownAddress);
		this.setFtpDownAddress(ftpDownAddress);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.String id;

	// fields
	private java.lang.String fileName;
	private java.lang.String contentType;
	private java.lang.String absolutePath;
	private java.lang.String description;
	private java.lang.String uploadUserId;
	private java.lang.String uploadIp;
	private java.util.Date uploadTime;
	private java.lang.String auditUserId;
	private java.lang.String auditIp;
	private java.lang.String auditResult;
	private java.lang.String auditRemark;
	private java.util.Date auditTime;
	private java.lang.Integer downloadTimes;
	private java.util.Date lastModifyTime;
	private java.lang.String categoryId;
	private java.lang.String httpDownAddress;
	private java.lang.String ftpDownAddress;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="uuid.hex"
     *  column="ID"
     */
	public java.lang.String getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.String id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: FILE_NAME
	 */
	public java.lang.String getFileName () {
		return fileName;
	}

	/**
	 * Set the value related to the column: FILE_NAME
	 * @param fileName the FILE_NAME value
	 */
	public void setFileName (java.lang.String fileName) {
		this.fileName = fileName;
	}



	/**
	 * Return the value associated with the column: CONTENT_TYPE
	 */
	public java.lang.String getContentType () {
		return contentType;
	}

	/**
	 * Set the value related to the column: CONTENT_TYPE
	 * @param contentType the CONTENT_TYPE value
	 */
	public void setContentType (java.lang.String contentType) {
		this.contentType = contentType;
	}



	/**
	 * Return the value associated with the column: ABSOLUTE_PATH
	 */
	public java.lang.String getAbsolutePath () {
		return absolutePath;
	}

	/**
	 * Set the value related to the column: ABSOLUTE_PATH
	 * @param absolutePath the ABSOLUTE_PATH value
	 */
	public void setAbsolutePath (java.lang.String absolutePath) {
		this.absolutePath = absolutePath;
	}



	/**
	 * Return the value associated with the column: DESCRIPTION
	 */
	public java.lang.String getDescription () {
		return description;
	}

	/**
	 * Set the value related to the column: DESCRIPTION
	 * @param description the DESCRIPTION value
	 */
	public void setDescription (java.lang.String description) {
		this.description = description;
	}



	/**
	 * Return the value associated with the column: UPLOAD_USER_ID
	 */
	public java.lang.String getUploadUserId () {
		return uploadUserId;
	}

	/**
	 * Set the value related to the column: UPLOAD_USER_ID
	 * @param uploadUserId the UPLOAD_USER_ID value
	 */
	public void setUploadUserId (java.lang.String uploadUserId) {
		this.uploadUserId = uploadUserId;
	}



	/**
	 * Return the value associated with the column: UPLOAD_IP
	 */
	public java.lang.String getUploadIp () {
		return uploadIp;
	}

	/**
	 * Set the value related to the column: UPLOAD_IP
	 * @param uploadIp the UPLOAD_IP value
	 */
	public void setUploadIp (java.lang.String uploadIp) {
		this.uploadIp = uploadIp;
	}



	/**
	 * Return the value associated with the column: UPLOAD_TIME
	 */
	public java.util.Date getUploadTime () {
		return uploadTime;
	}

	/**
	 * Set the value related to the column: UPLOAD_TIME
	 * @param uploadTime the UPLOAD_TIME value
	 */
	public void setUploadTime (java.util.Date uploadTime) {
		this.uploadTime = uploadTime;
	}



	/**
	 * Return the value associated with the column: AUDIT_USER_ID
	 */
	public java.lang.String getAuditUserId () {
		return auditUserId;
	}

	/**
	 * Set the value related to the column: AUDIT_USER_ID
	 * @param auditUserId the AUDIT_USER_ID value
	 */
	public void setAuditUserId (java.lang.String auditUserId) {
		this.auditUserId = auditUserId;
	}



	/**
	 * Return the value associated with the column: AUDIT_IP
	 */
	public java.lang.String getAuditIp () {
		return auditIp;
	}

	/**
	 * Set the value related to the column: AUDIT_IP
	 * @param auditIp the AUDIT_IP value
	 */
	public void setAuditIp (java.lang.String auditIp) {
		this.auditIp = auditIp;
	}



	/**
	 * Return the value associated with the column: AUDIT_RESULT
	 */
	public java.lang.String getAuditResult () {
		return auditResult;
	}

	/**
	 * Set the value related to the column: AUDIT_RESULT
	 * @param auditResult the AUDIT_RESULT value
	 */
	public void setAuditResult (java.lang.String auditResult) {
		this.auditResult = auditResult;
	}



	/**
	 * Return the value associated with the column: AUDIT_REMARK
	 */
	public java.lang.String getAuditRemark () {
		return auditRemark;
	}

	/**
	 * Set the value related to the column: AUDIT_REMARK
	 * @param auditRemark the AUDIT_REMARK value
	 */
	public void setAuditRemark (java.lang.String auditRemark) {
		this.auditRemark = auditRemark;
	}



	/**
	 * Return the value associated with the column: AUDIT_TIME
	 */
	public java.util.Date getAuditTime () {
		return auditTime;
	}

	/**
	 * Set the value related to the column: AUDIT_TIME
	 * @param auditTime the AUDIT_TIME value
	 */
	public void setAuditTime (java.util.Date auditTime) {
		this.auditTime = auditTime;
	}



	/**
	 * Return the value associated with the column: DOWNLOAD_TIMES
	 */
	public java.lang.Integer getDownloadTimes () {
		return downloadTimes;
	}

	/**
	 * Set the value related to the column: DOWNLOAD_TIMES
	 * @param downloadTimes the DOWNLOAD_TIMES value
	 */
	public void setDownloadTimes (java.lang.Integer downloadTimes) {
		this.downloadTimes = downloadTimes;
	}



	/**
	 * Return the value associated with the column: LAST_MODIFY_TIME
	 */
	public java.util.Date getLastModifyTime () {
		return lastModifyTime;
	}

	/**
	 * Set the value related to the column: LAST_MODIFY_TIME
	 * @param lastModifyTime the LAST_MODIFY_TIME value
	 */
	public void setLastModifyTime (java.util.Date lastModifyTime) {
		this.lastModifyTime = lastModifyTime;
	}



	/**
	 * Return the value associated with the column: CATEGORY_ID
	 */
	public java.lang.String getCategoryId () {
		return categoryId;
	}

	/**
	 * Set the value related to the column: CATEGORY_ID
	 * @param categoryId the CATEGORY_ID value
	 */
	public void setCategoryId (java.lang.String categoryId) {
		this.categoryId = categoryId;
	}



	/**
	 * Return the value associated with the column: HTTP_DOWN_ADDRESS
	 */
	public java.lang.String getHttpDownAddress () {
		return httpDownAddress;
	}

	/**
	 * Set the value related to the column: HTTP_DOWN_ADDRESS
	 * @param httpDownAddress the HTTP_DOWN_ADDRESS value
	 */
	public void setHttpDownAddress (java.lang.String httpDownAddress) {
		this.httpDownAddress = httpDownAddress;
	}



	/**
	 * Return the value associated with the column: FTP_DOWN_ADDRESS
	 */
	public java.lang.String getFtpDownAddress () {
		return ftpDownAddress;
	}

	/**
	 * Set the value related to the column: FTP_DOWN_ADDRESS
	 * @param ftpDownAddress the FTP_DOWN_ADDRESS value
	 */
	public void setFtpDownAddress (java.lang.String ftpDownAddress) {
		this.ftpDownAddress = ftpDownAddress;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.csair.youth.database.Resource)) return false;
		else {
			com.csair.youth.database.Resource resource = (com.csair.youth.database.Resource) obj;
			if (null == this.getId() || null == resource.getId()) return false;
			else return (this.getId().equals(resource.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}